<?php echo $this->fetch('header.html'); ?>
<div id="rightTop">
    <p>手机素材管理</p>
    <ul class="subnav">
        <li><span>管理</span></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="ad" />
                <input type="hidden" name="act" value="index" />
                <select class="querySelect" name="ad_type">
                    <option value="">广告位置</option>
                    <?php echo $this->html_options(array('options'=>$this->_var['ad_type_list'],'selected'=>$_GET['ad_type'])); ?>
                </select>
                <input type="submit" class="formbtn" value="查询" />
            </div>
            <?php if ($this->_var['filtered']): ?>
            <a class="left formbtn1" href="index.php?app=app_ad&wait_verify=<?php echo $this->_var['wait_verify']; ?>">撤销检索</a>
            <?php endif; ?>
        </form>
    </div>
    <div class="fontr">
        <?php if ($this->_var['ads']): ?><?php echo $this->fetch('page.top.html'); ?><?php endif; ?>
    </div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <?php if ($this->_var['ads']): ?>
        <tr class="tatr1">
            <td width="1%" class="firstCell"></td>
            <td class="align_center" width="20%"><span ectype="order_by" fieldname="ad_type">广告图位置</span></td>
            <td class="align_center" width="20%">广告图名称</td>
            <td class="align_center" width="20%">广告图片</td>
            <td class="align_center" width="20%">广告描述</td>
            <td class="handler" >操作</td>
        </tr>
        <?php endif; ?>
        <?php $_from = $this->_var['ads']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'ad');if (count($_from)):
    foreach ($_from AS $this->_var['ad']):
?>
        <tr class="tatr2">
            <td class="firstCell"></td>
            <td><?php echo $this->_var['ad']['ad_type']; ?></td>
            <td><?php echo htmlspecialchars($this->_var['ad']['ad_name']); ?></td>
            <td><?php if ($this->_var['ad']['ad_pic']): ?><img src="<?php echo $this->_var['ad']['ad_pic']; ?>?<?php echo $this->_var['random_number']; ?>" height="30"/><?php endif; ?></td>
            <td><?php echo htmlspecialchars($this->_var['ad']['ad_description']); ?></td>
            <td class="handler">
                <a href="index.php?app=app_ad&amp;act=edit&amp;id=<?php echo $this->_var['ad']['ad_id']; ?>">编辑</a>
            </td>
        </tr>
        <?php endforeach; else: ?>
        <tr class="no_data">
            <td colspan="7">没有符合条件的记录</td>
        </tr>
        <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </table>
    <?php if ($this->_var['ads']): ?>
    <div id="dataFuncs">
        <div class="pageLinks">
            <?php if ($this->_var['ads']): ?><?php echo $this->fetch('page.bottom.html'); ?><?php endif; ?>
        </div>
    </div>
    <?php endif; ?>
    <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>
